|
|
|
|
|
|
|
' compute btn locations
intBtnWidth = 660
intBtnHeight = 300
'
Select Case intBBAlign
Case bbTop
intBtnTop = 60
intBtnWidth = (frmTemp.ScaleWidth - 60) / 8
If intBtnWidth < 660 Then intBtnWidth = 660
intBtnHeight = 300
Case bbBottom
intBtnTop = frmTemp.ScaleHeight - 360
intBtnWidth = (frmTemp.ScaleWidth - 60) / 8
If intBtnWidth < 660 Then intBtnWidth = 660
intBtnHeight = 300
Case bbLeft
intBtnWidth = 660
intBtnleft = 60
intBtnHeight = (frmTemp.ScaleHeight - 60) / 8
If intBtnHeight < 300 Then intBtnHeight = 300
Case bbRight
intBtnWidth = 660
intBtnleft = frmTemp.ScaleWidth - 720
intBtnHeight = (frmTemp.ScaleHeight - 60) / 8
If intBtnHeight < 300 Then intBtnHeight = 300
End Select
'
' now place buttons on the form
For intLoop = 0 To 7
If intBBAlign = bbTop Or intBBAlign = bbBottom Then
intBtnleft = intLoop * intBtnWidth
Else
intBtnTop = (intLoop * intBtnHeight) + 60
End If
'
On Error Resume Next
With frmTemp
If intLoop <> 0 Then
Load .cmdbtn(intLoop)
End If
.cmdbtn(intLoop).Width = intBtnWidth
.cmdbtn(intLoop).Left = intBtnleft
.cmdbtn(intLoop).Top = intBtnTop
.cmdbtn(intLoop).Height = intBtnHeight
.cmdbtn(intLoop).Caption = varCap(intLoop)
.cmdbtn(intLoop).Visible = True
End With
Next
'
BBInit = 0
Exit Function
' |
|
|
|
|
|